<?php /* Smarty version Smarty-3.0.5, created on 2015-11-21 14:47:07
         compiled from "D:\WWW\phpcms5\admin/liangjingcms/delimitlabel.tpl" */ ?>
<?php /*%%SmartyHeaderCode:47915650136b0cb599-87095511%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'f7a948abdba59d681b50ce7689dd407fcc671cdf' => 
    array (
      0 => 'D:\\WWW\\phpcms5\\admin/liangjingcms/delimitlabel.tpl',
      1 => 1448064337,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '47915650136b0cb599-87095511',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
<?php if (!is_callable('smarty_modifier_date_format')) include 'D:\WWW\phpcms5\source\core\plugins\modifier.date_format.php';
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $_smarty_tpl->getVariable('page_charset')->value;?>
" />
<title>自定义HTML标签</title>
<meta name="author" content="<?php echo $_smarty_tpl->getVariable('copyright_author')->value;?>
" />
<link type="text/css" rel="stylesheet" href="liangjingcms/css/admin_style.css" media="screen" />
<script type='text/javascript' src='js/jquery-1.4.4.min.js'></script>
<script type='text/javascript' src='js/command.js'></script>
<script type="text/javascript" src='../data/editor/kindeditor.js'></script>
</head>
<body>
<?php if ($_smarty_tpl->getVariable('action')->value==''){?>
<div class="main-wrap">
  <div class="path"><p>当前位置：其他扩展<span>&gt;&gt;</span>自定义HTML标签</p></div>
  <div class="main-cont">
    <h3 class="title"><a href="ljcms_delimitlabel.php?action=add" class="btn-general"><span>添加标签</span></a>自定义HTML标签</h3>
	<div class="search-area ">
	  <form method="post" id="search_form" action="ljcms_delimitlabel.php" />
	  <div class="item">
	    <label>所属风格模板：</label><?php echo $_smarty_tpl->getVariable('skin_search')->value;?>
&nbsp;&nbsp;
		<label>标签描述：</label><input type="text" id="sname" name="sname" size="15" class="input" value="<?php echo $_smarty_tpl->getVariable('sname')->value;?>
" />&nbsp;&nbsp;&nbsp;
		<input type="submit" class="button_s" value="搜 索" />
	  </div>
	  </form>
	</div>
	<form action="ljcms_delimitlabel.php" method="post" name="myform" id="myform" style="margin:0">
	<input type="hidden" name="action" id="action" value="del" />
    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table" align="center">
	  <thead class="tb-tit-bg">
	  <tr>
	    <th width="10%"><div class="th-gap">选择</div></th>
		<th width="15%"><div class="th-gap">所属风格</div></th>
		<th width="20%"><div class="th-gap">标签名</div></th>
		<th width="15%"><div class="th-gap">标签描述</div></th>
		<th width="8%"><div class="th-gap">状态</div></th>
		<th width="18%"><div class="th-gap">录入时间</div></th>
		<th><div class="th-gap">操作</div></th>
	  </tr>
	  </thead>
	  <tfoot class="tb-foot-bg"></tfoot>
	  <?php  $_smarty_tpl->tpl_vars['volist'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('delimitlabel')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['volist']->key => $_smarty_tpl->tpl_vars['volist']->value){
?>
	  <tr onMouseOver="overColor(this)" onMouseOut="outColor(this)">
	    <td align="center"><input name="id[]" type="checkbox" value="<?php echo $_smarty_tpl->tpl_vars['volist']->value['labelid'];?>
" onClick="checkItem(this, 'chkAll')"></td>
		<td align="center"><?php echo $_smarty_tpl->tpl_vars['volist']->value['skinname'];?>
</td>
		<td align="left">&lt;!--{$delimit_<?php echo $_smarty_tpl->tpl_vars['volist']->value['labelname'];?>
}--&gt;</td>
		<td align="left"><?php echo $_smarty_tpl->tpl_vars['volist']->value['labeltitle'];?>
</td>
		<td align="center">
		<?php if ($_smarty_tpl->tpl_vars['volist']->value['flag']==0){?>
			<input type="hidden" id="attr_flag<?php echo $_smarty_tpl->tpl_vars['volist']->value['labelid'];?>
" value="flagopen" />
			<img id="flag<?php echo $_smarty_tpl->tpl_vars['volist']->value['labelid'];?>
" src="liangjingcms/images/no.gif" onClick="javascript:fetch_ajax('flag','<?php echo $_smarty_tpl->tpl_vars['volist']->value['labelid'];?>
');" style="cursor:pointer;">
		<?php }else{ ?>
			<input type="hidden" id="attr_flag<?php echo $_smarty_tpl->tpl_vars['volist']->value['labelid'];?>
" value="flagclose" />
			<img id="flag<?php echo $_smarty_tpl->tpl_vars['volist']->value['labelid'];?>
" src="liangjingcms/images/yes.gif" onClick="javascript:fetch_ajax('flag','<?php echo $_smarty_tpl->tpl_vars['volist']->value['labelid'];?>
');" style="cursor:pointer;">	
		<?php }?>
        </td>
		<td><?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['volist']->value['timeline'],"%Y/%m/%d %H:%M:%S");?>
</td>
		<td align="center"><a href="ljcms_delimitlabel.php?action=edit&id=<?php echo $_smarty_tpl->tpl_vars['volist']->value['labelid'];?>
&page=<?php echo $_smarty_tpl->getVariable('page')->value;?>
" class="icon-edit">编辑</a>&nbsp;&nbsp;<a href="ljcms_delimitlabel.php?action=del&id[]=<?php echo $_smarty_tpl->tpl_vars['volist']->value['labelid'];?>
" onClick="{if(confirm('确定要删除该信息?')){return true;} return false;}" class="icon-del">删除</a></td>
	  </tr>
	  <?php }} else { ?>
      <tr>
	    <td colspan="7" align="center">暂无信息</td>
	  </tr>
	  <?php } ?>
	  <?php if ($_smarty_tpl->getVariable('total')->value>0){?>
	  <tr>
		<td align="center"><input name="chkAll" type="checkbox" id="chkAll" onClick="checkAll(this, 'id[]')" value="checkbox"></td>
		<td class="hback" colspan="6"><input class="button" name="btn_del" type="button" value="删 除" onClick="{if(confirm('确定删除选定信息吗!?')){$('#action').val('del');$('#myform').submit();return true;}return false;}" class="button">&nbsp;&nbsp;共[ <b><?php echo $_smarty_tpl->getVariable('total')->value;?>
</b> ]条记录</td>
	  </tr>
	  <?php }?>
	</table>
	</form>
	<?php if ($_smarty_tpl->getVariable('pagecount')->value>1){?>
	<table width='95%' border='0' cellspacing='0' cellpadding='0' align='center' style="margin-top:10px;">
	  <tr>
		<td align='center'><?php echo $_smarty_tpl->getVariable('showpage')->value;?>
</td>
	  </tr>
	</table>
	<?php }?>
  </div>
</div>
<?php }?>

<?php if ($_smarty_tpl->getVariable('action')->value=="add"){?>
<div class="main-wrap">
  <div class="path"><p>当前位置：其他扩展<span>&gt;&gt;</span>添加标签</p></div>
  <div class="main-cont">
	<h3 class="title"><a href="ljcms_delimitlabel.php" class="btn-general"><span>返回列表</span></a>添加标签</h3>
    <form name="myform" id="myform" method="post" action="ljcms_delimitlabel.php" onsubmit='return checkform();' />
    <input type="hidden" name="action" value="saveadd" />
	<table cellpadding='3' cellspacing='3' class='tab'>
	  <tr>
		<td class='hback_1' width="15%">所属风格模板 <span class='f_red'></span></td>
		<td class='hback' width="85%"><?php echo $_smarty_tpl->getVariable('skin_select')->value;?>
 <span id="dskinid" class='f_red'></span></td>
	  </tr>
	  <tr>
		<td class='hback_1'>标签名称 <span class="f_red">*</span> </td>
		<td class='hback'>&lt!--{$delimit_<input type="text" name="labelname" id="labelname" class="input-txt" />}--&gt;  <span id='dlabelname' class='f_red'></span> (标签名只能字母、数字组成)</td>
	  </tr>
	  <tr>
		<td class='hback_1'>标签描述 <span class="f_red">*</span> </td>
		<td class='hback'><input type="text" name="labeltitle" id="labeltitle" class="input-txt" />  <span id='dlabeltitle' class='f_red'></span></td>
	  </tr>
	  <tr>
		<td class='hback_1'>状态设置 </td>
		<td class='hback'><?php echo $_smarty_tpl->getVariable('flag_checkbox')->value;?>
</td>
	  </tr>
	  <tr>
		<td class='hback_1'>备注说明</td>
		<td class='hback'><textarea name="intro" id="intro" style='width:60%;height:45px;display:;overflow:auto;'></textarea>  <span id='dintro' class='f_red'></span></td>
	  </tr>
	  <tr>
		<td class='hback_1'>标签内容</td>
		<td class='hback'>
		  <textarea name="labelcontent" id="labelcontent" style="width:98%;height:280px;display:none;"></textarea>
		  <script>KE.show({id : 'labelcontent' });</script>
		  <br />1、支持config标签，调用config标签时不需要使用起始符“&lt!--”和结束符“--&gt;”<br />
		           如：调用网站名称只需在内容里填写  {$config.sitetitle}<br />
		        2、支持{$skinpath}、{$urlpath}、{$url_频道名}标签。
		</td>
	  </tr>
	  <tr>
		<td class='hback_none'></td>
		<td class='hback_none'><input type="submit" name="btn_save" class="button" value="添加保存" /></td>
	  </tr>
	</table>
	</form>
  </div>
  <div style="clear:both;"></div>
</div>
<?php }?>

<?php if ($_smarty_tpl->getVariable('action')->value=="edit"){?>
<div class="main-wrap">
  <div class="path"><p>当前位置：其他扩展<span>&gt;&gt;</span>编辑标签</p></div>
  <div class="main-cont">
	<h3 class="title"><a href="ljcms_delimitlabel.php?<?php echo $_smarty_tpl->getVariable('comeurl')->value;?>
" class="btn-general"><span>返回列表</span></a>编辑标签</h3>
    <form name="myform" id="myform" method="post" action="ljcms_delimitlabel.php" onsubmit='return checkform();' />
    <input type="hidden" name="action" value="saveedit" />
	<input type="hidden" name="id" value="<?php echo $_smarty_tpl->getVariable('id')->value;?>
" />
	<table cellpadding='3' cellspacing='3' class='tab'>
	  <tr>
		<td class='hback_1' width="15%">所属风格模板 <span class='f_red'></span></td>
		<td class='hback' width="85%"><?php echo $_smarty_tpl->getVariable('skin_select')->value;?>
 <span id="dskinid" class='f_red'></span></td>
	  </tr>
	  <tr>
		<td class='hback_1'>标签名称 <span class="f_red">*</span> </td>
		<td class='hback'>{$delimit_<input type="text" name="labelname" id="labelname" class="input-txt" value="<?php echo $_smarty_tpl->getVariable('delimitlabel')->value['labelname'];?>
" />}  <span id='dlabelname' class='f_red'></span> (标签名只能字母、数字组成)</td>
	  </tr>
	  <tr>
		<td class='hback_1'>标签描述 <span class="f_red">*</span> </td>
		<td class='hback'><input type="text" name="labeltitle" id="labeltitle" class="input-txt" value="<?php echo $_smarty_tpl->getVariable('delimitlabel')->value['labeltitle'];?>
" />  <span id='dlabeltitle' class='f_red'></span></td>
	  </tr>
	  <tr>
		<td class='hback_1'>状态设置 </td>
		<td class='hback'><?php echo $_smarty_tpl->getVariable('flag_checkbox')->value;?>
</td>
	  </tr>
	  <tr>
		<td class='hback_1'>备注说明</td>
		<td class='hback'><textarea name="intro" id="intro" style='width:60%;height:45px;display:;overflow:auto;'><?php echo $_smarty_tpl->getVariable('delimitlabel')->value['intro'];?>
</textarea>  <span id='dintro' class='f_red'></span></td>
	  </tr>
	  <tr>
		<td class='hback_1'>标签内容</td>
		<td class='hback'>
		  <textarea name="labelcontent" id="labelcontent" style="width:98%;height:280px;display:none;"><?php echo $_smarty_tpl->getVariable('delimitlabel')->value['labelcontent'];?>
</textarea>
		  <script>KE.show({id : 'labelcontent' });</script>
		  <br />1、支持config标签，调用config标签时不需要使用起始符“&lt!--”和结束符“--&gt;”<br />
		           如：调用网站名称只需在内容里填写  {$config.sitetitle}<br />
		        2、支持{$skinpath}、{$urlpath}、{$url_频道名}标签。
		</td>
	  </tr>
	  <tr>
		<td class='hback_none'></td>
		<td class='hback_none'><input type="submit" name="btn_save" class="button" value="更新保存" /></td>
	  </tr>
	</table>
	</form>
  </div>
  <div style="clear:both;"></div>
</div>
<?php }?>
</body>
</html>
<script type="text/javascript">
function checkform() {
	var t = "";
	var v = "";

	t = "labelname";
	v = $("#"+t).val();
	if(v=="") {
		dmsg("标签名称不能为空", t);
		return false;
	}
	t = "labeltitle";
	v = $("#"+t).val();
	if(v=="") {
		dmsg("标签描述不能为空", t);
		return false;
	}
	return true;
}
</script>
